/*
 * POSGui.java
 *
 * Created on July 11, 2008, 1:09 PM
 */

package androidpos;

import androidpos.util.TransactionHandler;
import java.net.InetAddress;
import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import org.jvnet.substance.skin.SubstanceOfficeSilver2007LookAndFeel;
import org.jvnet.substance.skin.SubstanceRavenGraphiteGlassLookAndFeel;

/**
 *
 * @author  user
 */
public class POSGui extends javax.swing.JFrame {
    

    /** Creates new form POSGui */
    public POSGui() {
        initComponents();
        readerPanel1.setTransactionHandler(new TransactionHandler(transactionPanel1));
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        mainPanel = new javax.swing.JTabbedPane();
        readerPanel1 = new androidpos.gui.ReaderPanel();
        transactionPanel1 = new androidpos.gui.TransactionPanel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        try{setTitle(InetAddress.getLocalHost().getHostAddress());} catch (Exception e){}

        mainPanel.addTab("Reader", readerPanel1);
        mainPanel.addTab("Transaction", transactionPanel1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 478, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 360, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) throws UnsupportedLookAndFeelException 
    {
        UIManager.setLookAndFeel(new SubstanceRavenGraphiteGlassLookAndFeel());
        JFrame.setDefaultLookAndFeelDecorated(true);
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                    new POSGui().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTabbedPane mainPanel;
    private androidpos.gui.ReaderPanel readerPanel1;
    private androidpos.gui.TransactionPanel transactionPanel1;
    // End of variables declaration//GEN-END:variables

}
